home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / set80.zip / SET80.ASM < prev    next >
Assembly Source File  |  1987-08-16  |  3KB  |  74 lines

  1.         PAGE    ,132
  2.  
  3. CSEG    SEGMENT PARA PUBLIC 'CODE'
  4.         ASSUME  CS:CSEG,DS:CSEG
  5.  
  6. SetDT    PROC
  7.         JMP   StartOfCode
  8.  
  9. A_DeviceParameters:
  10. SpecialFunctions:    db               04h      ;  this is the new default BPB
  11.                                                ; all sectors are the same size
  12. DeviceType:          db               00h      ; 320/360kb 5.25" floppy
  13. DeviceAttributes:    dw               00h      ; no change line support
  14.                                                ; media is removeable
  15. NumberOfCylinders:   dw               80
  16. MediaType:           db               02h      ; media type is dd ds 5.25"
  17. DeviceBpB:
  18.  
  19. BytesPerSector      dw               512
  20. SectorsPerCluster   db               2
  21. ReservedSectors     dw               1
  22. NumberOfFats        db               2
  23. RootEntries         dw               112
  24. TotalSectors        dw               80*9*2
  25. MediaDescriptor     db               0FDH
  26. SectorsPerFat       dw               3
  27. SectorsPerTrack     dw               9
  28. Heads               dw               2
  29. HiddenSectors       dd               0
  30. Reserved_1          dd               ?
  31. Reserved_2          db               6 dup(0)
  32.  
  33. TrackLayout:
  34. SectorCount:        dw               9h
  35. SectorNumber:       dw               1h
  36. SectorSize:         dw               200h
  37. etc:                dw               6h
  38.                     dw               200h
  39.                     dw               2h
  40.                     dw               200h
  41.                     dw               7h
  42.                     dw               200h
  43.                     dw               3h
  44.                     dw               200h
  45.                     dw               8h
  46.                     dw               200h
  47.                     dw               4h
  48.                     dw               200h
  49.                     dw               9h
  50.                     dw               200h
  51.                     dw               5h
  52.                     dw               200h
  53.  
  54.  
  55. StartOfCode:
  56.                     MOV              AH,44H         ; IOCTL
  57.                     MOV              AL,0DH         ; Subfunction Generic request
  58.                     MOV              BL,2           ; For drive B
  59.                     MOV              CH,08H         ; Major code (Category)
  60.                     MOV              CL,40H         ; Set Device Parameters
  61.                     PUSH             CS             ; DS has to point to Code Segment
  62.                     POP              DS
  63.                     MOV              DX,Offset A_DeviceParameters
  64.                     INT              21H
  65.                     mov              ah,4ch         ; Terminate nicely
  66.                     int              21h
  67.  
  68.  
  69. SetDT               ENDP
  70.  
  71. CSEG                ENDS
  72.                     END
  73.  
  74.